﻿Namespace Email.Dominio

    ''' <summary>
    ''' Classe de Solicitação de envio de e-mail
    ''' </summary>
    ''' <remarks></remarks>
    Public Class SolicitacaoEnvioEmail

        Private _Id As Nullable(Of Long)

        ''' <summary>
        ''' Identificador do e-mail
        ''' </summary>
        ''' <value>Long</value>
        ''' <returns>Long</returns>
        ''' <remarks></remarks>
        Public Overridable Property Id() As Nullable(Of Long)
            Get
                Return _Id
            End Get
            Set(ByVal value As Nullable(Of Long))
                _Id = value
            End Set
        End Property

        Private _NomeDestinatario As String

        ''' <summary>
        ''' Nome do destinatário do e-mail
        ''' </summary>
        ''' <value>String</value>
        ''' <returns>String</returns>
        ''' <remarks></remarks>
        Public Overridable Property NomeDestinatario() As String
            Get
                Return _NomeDestinatario
            End Get
            Set(ByVal value As String)
                _NomeDestinatario = value
            End Set
        End Property

        Private _EmailDestinatario As String

        ''' <summary>
        ''' E-mail do destinatário
        ''' </summary>
        ''' <value>String</value>
        ''' <returns>String</returns>
        ''' <remarks></remarks>
        Public Overridable Property EmailDestinatario() As String
            Get
                Return _EmailDestinatario
            End Get
            Set(ByVal value As String)
                _EmailDestinatario = value
            End Set
        End Property

        Private _Assunto As String

        ''' <summary>
        ''' Assunto do e-mail
        ''' </summary>
        ''' <value>String</value>
        ''' <returns>String</returns>
        ''' <remarks></remarks>
        Public Overridable Property Assunto() As String
            Get
                Return _Assunto
            End Get
            Set(ByVal value As String)
                _Assunto = value
            End Set
        End Property

        Private _Texto As String

        ''' <summary>
        ''' Texto do e-mail
        ''' </summary>
        ''' <value>String</value>
        ''' <returns>String</returns>
        ''' <remarks></remarks>
        Public Overridable Property Texto() As String
            Get
                Return _Texto
            End Get
            Set(ByVal value As String)
                _Texto = value
            End Set
        End Property

        Private _TextoHtml As String

        ''' <summary>
        ''' Texto HTML do e-mail
        ''' </summary>
        ''' <value>String</value>
        ''' <returns>String</returns>
        ''' <remarks></remarks>
        Public Overridable Property TextoHtml() As String
            Get
                Return _TextoHtml
            End Get
            Set(ByVal value As String)
                _TextoHtml = value
            End Set
        End Property

        Private _CC As String

        ''' <summary>
        ''' Envio de cópia do e-mail visível a todos
        ''' </summary>
        ''' <value>String</value>
        ''' <returns>String</returns>
        ''' <remarks></remarks>
        Public Overridable Property CC() As String
            Get
                Return _CC
            End Get
            Set(ByVal value As String)
                _CC = value
            End Set
        End Property

        Private _BCC As String

        ''' <summary>
        ''' Envio de cópia do e-mail não visível a todos
        ''' </summary>
        ''' <value>String</value>
        ''' <returns>String</returns>
        ''' <remarks></remarks>
        Public Overridable Property BCC() As String
            Get
                Return _BCC
            End Get
            Set(ByVal value As String)
                _BCC = value
            End Set
        End Property

        Private _ReplyTo As String

        ''' <summary>
        ''' Resposta automática de e-mail
        ''' </summary>
        ''' <value>String</value>
        ''' <returns>String</returns>
        ''' <remarks></remarks>
        Public Overridable Property ReplyTo() As String
            Get
                Return _ReplyTo
            End Get
            Set(ByVal value As String)
                _ReplyTo = value
            End Set
        End Property

        Private _DataHoraAgendada As Nullable(Of DateTime)

        ''' <summary>
        ''' Data e hora agendada do e-mail
        ''' </summary>
        ''' <value>DateTime</value>
        ''' <returns>DateTime</returns>
        ''' <remarks></remarks>
        Public Overridable Property DataHoraAgendada() As Nullable(Of DateTime)
            Get
                Return _DataHoraAgendada
            End Get
            Set(ByVal value As Nullable(Of DateTime))
                _DataHoraAgendada = value
            End Set
        End Property

        Private _Status As StatusEnvio

        ''' <summary>
        ''' Status do envio do e-mail
        ''' </summary>
        ''' <value>StatusEnvio</value>
        ''' <returns>StatusEnvio</returns>
        ''' <remarks></remarks>
        Public Overridable Property Status() As StatusEnvio
            Get
                Return _Status
            End Get
            Set(ByVal value As StatusEnvio)
                _Status = value
            End Set
        End Property

        Private _DataHoraEnvio As Nullable(Of DateTime)

        ''' <summary>
        ''' Data e hora do envio do e-mail
        ''' </summary>
        ''' <value>DateTime</value>
        ''' <returns>DateTime</returns>
        ''' <remarks></remarks>
        Public Overridable Property DataHoraEnvio() As Nullable(Of DateTime)
            Get
                Return _DataHoraEnvio
            End Get
            Set(ByVal value As Nullable(Of DateTime))
                _DataHoraEnvio = value
            End Set
        End Property

        Private _UnidadeRequisitante As Nullable(Of Integer)

        ''' <summary>
        ''' Unidade Requisitante
        ''' </summary>
        ''' <value>Inteiro</value>
        ''' <returns>Inteiro</returns>
        ''' <remarks></remarks>
        Public Overridable Property UnidadeRequisitante() As Nullable(Of Integer)
            Get
                Return _UnidadeRequisitante
            End Get
            Set(ByVal value As Nullable(Of Integer))
                _UnidadeRequisitante = value
            End Set
        End Property

        Private _Email As Email

        ''' <summary>
        ''' E-mail
        ''' </summary>
        ''' <value>Email(classe Email)</value>
        ''' <returns>Email(classe Email)</returns>
        ''' <remarks></remarks>
        Public Overridable Property Email() As Email
            Get
                Return _Email
            End Get
            Set(ByVal value As Email)
                _Email = value
            End Set
        End Property

        Private _Anexos As IList(Of SolicitacaoEnvioEmailAnexo)

        ''' <summary>
        ''' Lista de Anexos do e-mail
        ''' </summary>
        ''' <value>Lista(classe SolicitacaoEnvioEmailAnexo)</value>
        ''' <returns>Lista(classe SolicitacaoEnvioEmailAnexo)</returns>
        ''' <remarks></remarks>
        Public Overridable Property Anexos() As IList(Of SolicitacaoEnvioEmailAnexo)
            Get
                Return _Anexos
            End Get
            Set(ByVal value As IList(Of SolicitacaoEnvioEmailAnexo))
                _Anexos = value
            End Set
        End Property

        ''' <summary>
        ''' Status de Envio 
        ''' </summary>
        ''' <remarks></remarks>
        Public Enum StatusEnvio
            Agendado = 0
            Enviado = 1
        End Enum

        ''' <summary>
        ''' Adiciona o parametro _anexo à Lista de Anexos (classe SolicitacaoEnvioEmailAnexo)
        ''' </summary>
        ''' <param name="_anexo"></param>
        ''' <remarks></remarks>
        Public Overridable Sub AdicionaAnexo(ByRef _anexo As SolicitacaoEnvioEmailAnexo)
            If _Anexos Is Nothing Then
                _Anexos = New List(Of SolicitacaoEnvioEmailAnexo)
            End If
            _anexo.SolicitacaoEnvioEmail = Me
            _Anexos.Add(_anexo)
        End Sub

        ''' <summary>
        ''' Limpa o parametro _Anexo
        ''' </summary>
        ''' <remarks></remarks>
        Public Overridable Sub LimpaAnexos()
            If Not _Anexos Is Nothing Then
                _Anexos.Clear()
            End If
        End Sub


        Private _tipoFatoGerador As String

        ''' <summary>
        ''' Propriedade TipoFatoGerador
        ''' </summary>
        ''' <value>TipoFatoGerador</value>
        ''' <returns>_tipoFatoGerador(String)</returns>
        ''' <remarks></remarks>
        Public Overridable Property TipoFatoGerador() As String
            Get
                Return _tipoFatoGerador
            End Get
            Set(ByVal value As String)
                _tipoFatoGerador = value
            End Set
        End Property


        Private _codigoFatoGerador As Long

        ''' <summary>
        ''' Propriedade CodigoFatoGerador
        ''' </summary>
        ''' <value>CodigoFatoGerador</value>
        ''' <returns>_codigoFatoGerador(Long)</returns>
        ''' <remarks></remarks>
        Public Overridable Property CodigoFatoGerador() As Long
            Get
                Return _codigoFatoGerador
            End Get
            Set(ByVal value As Long)
                _codigoFatoGerador = value
            End Set
        End Property


    End Class
End Namespace
